//$Id: LockCS.h,v 1.2 2004/12/17 06:28:17 root Exp $
#ifndef __LOCKC_H_COMMON_BASE__
#define __LOCKC_H_COMMON_BASE__

//#include <winsock2.h>
#include <windows.h>
#include <Winbase.h>
 


//##ModelId=44C4B5F70232
class CLockCS
{
public:
	//##ModelId=44C4B5F70233
	CLockCS(void)
	{
		InitializeCriticalSection( &m_csAccess );
	}
	//##ModelId=44C4B5F70235
	virtual ~CLockCS(void)
	{
		DeleteCriticalSection( &m_csAccess );
	}
	//##ModelId=44C4B5F70238
	virtual void Lock()
	{
		EnterCriticalSection( &m_csAccess );
	}
	//##ModelId=44C4B5F70243
	virtual void Unlock()
	{
		LeaveCriticalSection( &m_csAccess );
	}
protected:
	//##ModelId=44C4B5F70245
	CRITICAL_SECTION	m_csAccess;
};


#endif//__LOCKC_H_COMMON_BASE__
